<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'job_list2.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<link rel="stylesheet" type="text/css" href="css/table.css">

</head>
<body>
	<table>
		<caption><s:property value="department.dept_name" /></caption>
		<thead>
			<tr>
				<th>岗位ID</th>
				<th>岗位名称</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody id="tab">

			<s:iterator value="jobList" var="job">
				<tr>
					<td><s:property value="#job.job_id" />
					</td>
					<td><s:property value="#job.job_name" />
					</td>
					
				
					<td><a
						href="jobAction!delJob.action?job.job_id=<s:property value="#job.job_id" />">[删除]</a>
						<a
						href="jobAction!showUpdateJob.action?job.job_id=<s:property value="#job.job_id" />">[修改]</a></td>
				</tr>
			</s:iterator>


		</tbody>
	</table>
	<script type="text/javascript">
	<!--
		var Ptr = document.getElementById("tab").getElementsByTagName("tr");
		function $() {
			for (i = 1; i < Ptr.length + 1; i++) {
				Ptr[i - 1].style.backgroundColor = (i % 2 > 0) ? "#fff"
						: "#eee";
			}
		}
		window.onload = $;
		for ( var i = 0; i < Ptr.length; i++) {
			Ptr[i].onmouseover = function() {
				this.tmpClass = this.className;
				this.style.backgroundColor = "#ccc";

			};
			Ptr[i].onmouseout = function() {
				for (i = 1; i < Ptr.length + 1; i++) {
					Ptr[i - 1].style.backgroundColor = (i % 2 > 0) ? "#eee"
							: "#fff";
				}
			}
		}
	//-->
	</script>
</body>
</html>